//
//  CommoneTools.h
//  dzm
//
//  Created by dzmmac on 14-9-26.
//  Copyright (c) 2014年 dzmmac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@class MainInfoTitleFields;

@interface CommoneTools : NSObject

+(CommoneTools *) sharedManager;

+ (UIColor *)getHexColor:(NSString *)hexColor;

+(BOOL)isPhoneNumber:(NSString *)phoneNumber;

// 文件管理
+(BOOL)deleteSingleFile:(NSString *)filePath;
+(NSString *)filePathWithFileName:(NSString *)fileName;
+(void)saveDishFile:(NSString *)fileName dic:(NSDictionary *)dic;
+(NSDictionary *)loadDishFile:(NSString *)fileName;

/**
 *  改变视图的约束
 *
 *  @param view           需要改变的视图
 *  @param constraintHeight 约束的尺寸
 */
+(void)changeConstraintView:(UIView *)view constraintHeight:(float)constraintHeight;


/**
 *  改变视图的约束
 *
 *  @param view           需要改变的视图
 *  @param constraintHeight 约束的尺寸
 */
+(void)changeConstraintView:(UIView *)view constraintWidth:(float)constraintWidth;


+(UIView *)createLineWithFrame:(CGRect)frame;

// 获取属性字符串
+(NSMutableAttributedString *)getAttributeString:(NSArray *)attributeStringList;

// 获取地点后面附加的文字
+(NSAttributedString *)getBusLineStartLocationString:(NSString *)locationString extion:(NSString *)extion;

// 获取线路价格属性文字
+(NSMutableAttributedString *)getBusLinePriceString:(NSString *)ticketPrice isSale:(NSInteger)isSale salePrice:(NSString *)salePrice;


@end
